package org.pure.test.controller;

import org.pure.ioc.IocContainer;
import org.pure.ioc.annotation.Bean;
import org.pure.ioc.annotation.Inject;
import org.pure.test.service.IHelloSerivce;
import org.pure.test.service.impl.HelloService;

/**
 * Created by will.lin on 2015/8/11.
 */
@Bean
public class HelloController {

    public HelloController() throws IllegalAccessException {
        IocContainer.init();
    }

    @Inject(HelloService.class)
    private IHelloSerivce helloSerivce;


    public String hello()  {
        String str = helloSerivce.hello("linyang");
        System.out.println(str);
        return str;
    }

}
